package com.zwy.fornote.service;

import com.github.pagehelper.PageInfo;
import com.zwy.fornote.entity.req.NewUserReq;
import com.zwy.fornote.entity.req.PageReq;
import com.zwy.fornote.entity.req.UserManageReq;
import com.zwy.fornote.entity.vo.CountUserArticleVO;
import com.zwy.fornote.entity.vo.QuestionAndAnswerByUser;
import com.zwy.fornote.entity.vo.UserManageVO;
import com.zwy.fornote.model.User;

import java.util.List;

/**
 *用户业务类接口
 *
 * @author zhuyi 1205242
 * @version UserService 2021/3/4 20:32
 */
public interface UserService {

    //新建用户
    int createNewUser(NewUserReq req);

    //根据ID查询用户
    User getUserByID(int id);

    //是否能登录--看拿到的User是否为空
    User getUserByAccountAndPassword(String account,String password);

    //禁用用户
    int lockUser(int id);

    //解封用户
    int unlockUser(int id);

    //检查用户状态
    int checkUserStatus(int id);

    //获取该用户的回答和关联的问题
    List<QuestionAndAnswerByUser> getUserAnswerAndQuestion(int useId);

    int changeHeadPic(int userId,String headPic);

    PageInfo<UserManageVO> selectManageUserList(UserManageReq req);

    PageInfo<CountUserArticleVO> getCountUserArticle(PageReq req);

    List<Integer> getAnalysis();
}
